Commit Graph

495 Commits

Author SHA1 Message Date
florian
d88d2ed099 * splitting of i386\cgcpu.pas into x86\cgx86.pas and i386\cgcpu.pas
cgx86.pas will contain the common code for i386 and x86_64
2002-07-20 19:28:47 +00:00
florian
59abf2555b * types.pas renamed to defbase.pas because D6 contains a types
unit so this would conflicts if D6 programms are compiled
  + Willamette/SSE2 instructions to assembler added
2002-07-20 11:57:52 +00:00
florian
31da813d1d * exit is now a syssym instead of a keyword 2002-07-16 15:34:20 +00:00
florian
336808f6c3 * start of the new generic parameter handling 2002-07-11 14:41:27 +00:00
florian
07783d2a0d * powerpc target fixed, very simple units can be compiled
* some basic stuff for better callparanode handling, far from being finished
2002-07-07 09:52:32 +00:00
carl
63e0f03f63 + generic set handling 2002-07-06 20:27:26 +00:00
florian
479a745096 * first x86-64 patches 2002-07-04 20:43:00 +00:00
peter
4285e99853 * internal linker
* reorganized aasm layer
2002-07-01 18:46:20 +00:00
peter
86ed32cc55 * obsolete 2002-07-01 16:29:23 +00:00
peter
68ce5a00e5 * cg64 patch
* basics for currency
  * asnode updates for class and interface (not finished)
2002-07-01 16:23:52 +00:00
Jonas Maebe
09de3f8d5b * fixed errors found with new -CR code from Peter when cycling with -O2p3r 2002-06-24 12:43:00 +00:00
carl
b2ab15a9a3 * bugfix of missing popecx for shift operations 2002-06-16 08:16:59 +00:00
Jonas Maebe
e483612cf2 * IDIV reads edx too (but now the div/mod optimization fails :/ ) 2002-06-09 12:56:04 +00:00
Jonas Maebe
f233163464 * fixed detection of register usage 2002-06-09 12:55:23 +00:00
carl
33b79c188a + generic FPC_HELP_FAIL
+ generic FPC_HELP_DESTRUCTOR instated (original from Pierre)
+ generic FPC_DISPOSE_CLASS
+ TEST_GENERIC define
2002-05-22 19:02:16 +00:00
carl
d75603c2ed * bugfix of hdisponen (base must be set, not index)
* more portability fixes
2002-05-20 13:30:40 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
f6b3e2e37f * synchronized cpubase between powerpc and i386
* moved more tables from cpubase to cpuasm
  * tai_align_abstract moved to tainst, cpuasm must define
    the tai_align class now, which may be empty
2002-05-14 17:28:08 +00:00
peter
4a176c81bc * removed n386ld and n386util units
* maybe_save/maybe_restore added instead of the old maybe_push
2002-05-13 19:54:36 +00:00
carl
11a60a8a1e * some small portability fixes 2002-05-12 19:58:36 +00:00
peter
4dcd96747e * moved entry and exitcode to ncgutil and cgobj
* foreach gets extra argument for passing local data to the
    iterator function
  * -CR checks also class typecasts at runtime by changing them
    into as
  * fixed compiler to cycle with the -CR option
  * fixed stabs with elf writer, finally the global variables can
    be watched
  * removed a lot of routines from cga unit and replaced them by
    calls to cgobj
  * u32bit-s32bit updates for and,or,xor nodes. When one element is
    u32bit then the other is typecasted also to u32bit without giving
    a rangecheck warning/error.
  * fixed pascal calling method with reversing also the high tree in
    the parast, detected by tcalcst3 test
2002-05-12 16:53:04 +00:00
peter
268e4bb7e7 * use saveregisters for incr routines, saves also problems with
the optimizer
2002-04-26 15:19:04 +00:00
peter
cc8c4d7093 * moved more routines from cga/n386util 2002-04-25 20:16:38 +00:00
florian
37194d2f61 * fixed more problems with cpubase and x86-64 2002-04-25 16:12:09 +00:00
peter
67ede1276b * add pinline unit that inserts compiler supported functions using
one or more statements
  * moved finalize and setlength from ninl to pinline
2002-04-23 19:16:34 +00:00
peter
624e5bd699 * fixed @methodpointer 2002-04-22 16:30:05 +00:00
peter
6320530bdd * removed newn and disposen nodes, the code is now directly
inlined from pexpr
  * -an option that will write the secondpass nodes to the .s file, this
    requires EXTDEBUG define to actually write the info
  * fixed various internal errors and crashes due recent code changes
2002-04-21 19:02:03 +00:00
carl
1da6f9535c * changeregsize -> rg.makeregsize
* changeregsize moved from cpubase to here
2002-04-21 15:43:32 +00:00
carl
21593abffb - removed some other stuff to their units 2002-04-21 15:31:40 +00:00
carl
654e5540ee * changeregsize -> rg.makeregsize
+ a_jmp_always added
2002-04-21 15:31:05 +00:00
carl
fb605f11b0 * changeregsize -> rg.makeregsize 2002-04-21 15:29:53 +00:00
carl
83ee224b80 + optimization cpu specific information base file 2002-04-20 21:50:14 +00:00
carl
b4f0af389d + generic FPC_CHECKPOINTER
+ first parameter offset in stack now portable
* rename some constants
+ move some cpu stuff to other units
- remove unused constents
* fix stacksize for some targets
* fix generic size problems which depend now on EXTEND_SIZE constant
* removing frame pointer in routines is only available for : i386,m68k and vis targets
2002-04-20 21:37:07 +00:00
peter
8d0751ff97 * removed some more routines from cga
* moved location_force_reg/mem to ncgutil
  * moved arrayconstructnode secondpass to ncgld
2002-04-19 15:39:34 +00:00
peter
6d3ac41ce6 * fixed conflicts between the last 2 commits 2002-04-15 19:53:54 +00:00
peter
3bcfe33002 * fixed stackcheck that would be called recursively when a stack
error was found
  * generic changeregsize(reg,size) for i386 register resizing
  * removed some more routines from cga unit
  * fixed returnvalue handling
  * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
2002-04-15 19:44:18 +00:00
carl
79b490d551 + target_info.size_of_pointer -> pointer_size
+ some cleanup of unused types/variables
* move several constants from cpubase to their specific units
  (where they are used)
+ att_Reg2str -> gas_reg2str
+ int_reg2str -> std_reg2str
2002-04-15 19:12:09 +00:00
carl
85216e1a0e + stack checking enabled for all targets (it is simulated now) 2002-04-14 20:54:17 +00:00
carl
39c86c857d + att_reg2str -> gas_reg2str 2002-04-14 16:58:41 +00:00
carl
f3bfe280a8 + move into aggas most of the stuff non-processor specific 2002-04-14 16:58:04 +00:00
Jonas Maebe
3566880766 * fix for the ie9999 under Linux (patch from Peter) 2002-04-10 08:07:55 +00:00
carl
4cff0f13fd - moved type constant 2002-04-07 13:41:50 +00:00
carl
6b39ecb2ef - remove unused variable 2002-04-07 09:16:07 +00:00
Jonas Maebe
bb959439f0 * fixed web bug #1915 2002-04-05 15:09:13 +00:00
peter
5e7a1e3729 * removed unused units
* use tlocation.size in cg.a_*loc*() routines
2002-04-04 19:05:54 +00:00
carl
0ee2ac7451 + added wdosx support (patch from Pavel) 2002-04-04 18:30:22 +00:00
carl
555c30ce2f + added wdosx support (patch from Pavel) 2002-04-04 18:27:37 +00:00
carl
303ad5eeaa + added wdosx patch from Pavel 2002-04-04 18:25:30 +00:00
michael
e043c5af70 * Patch from peter to fix go32v2 cycle 2002-04-04 07:56:15 +00:00
Jonas Maebe
807cf0000b * fixed regvar-related bugs (the load node set the location to
LOC_REGISTER instead of LOC_CREGISTER and the assignment node didn't
    support loading constants in LOC_CREGISTER's)
2002-04-03 10:43:37 +00:00
Jonas Maebe
adb8b9eabf + support for folding inc/dec in shl/add/sub sequences toa single lea
instruction
2002-04-02 20:30:16 +00:00
Jonas Maebe
36699776ee * optimized the code generated by the a_op_const_* and a_op64_const
methods
2002-04-02 20:29:02 +00:00
peter
5b242f7741 * tlocation,treference update
* LOC_CONSTANT added for better constant handling
  * secondadd splitted in multiple routines
  * location_force_reg added for loading a location to a register
    of a specified size
  * secondassignment parses now first the right and then the left node
    (this is compatible with Kylix). This saves a lot of push/pop especially
    with string operations
  * adapted some routines to use the new cg methods
2002-04-02 17:11:27 +00:00
Jonas Maebe
511582cde3 * fixed nasty bug in "and" peepholeoptimization that caused wrong
optimizations after Peter's big location patch
2002-04-02 13:01:58 +00:00
Jonas Maebe
313e7a0053 * better fix for new/dispose bug with init/final data 2002-04-01 09:44:04 +00:00
Jonas Maebe
7fb55bf4e4 + a_loadfpu_* and a_loadmm_* methods in tcg
* register allocation is now handled by a class and is mostly processor
    independent (+rgobj.pas and i386/rgcpu.pas)
  * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  * some small improvements and fixes to the optimizer
  * some register allocation fixes
  * some fpuvaroffset fixes in the unary minus node
  * push/popusedregisters is now called rg.save/restoreusedregisters and
    (for i386) uses temps instead of push/pop's when using -Op3 (that code is
    also better optimizable)
  * fixed and optimized register saving/restoring for new/dispose nodes
  * LOC_FPU locations now also require their "register" field to be set to
    R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  - list field removed of the tnode class because it's not used currently
    and can cause hard-to-find bugs
2002-03-31 20:26:33 +00:00
carl
eb09d6061c - remove go32v1 support 2002-03-28 20:46:44 +00:00
armin
ed209a3961 + initialize threadvars defined local in units 2002-03-28 16:07:52 +00:00
peter
b4cc4b7b01 * removed compiler warnings 2002-03-04 19:10:11 +00:00
peter
fd2ad837e2 * implicit result variable generation for assembler routines
* removed m_tp modeswitch, use m_tp7 or not(m_fpc) instead
2002-01-24 18:25:48 +00:00
peter
869ca12ddb * fixed init/final for value parameters 2002-01-19 14:21:17 +00:00
peter
60d2ddbbd5 * protected/private symbols parsing fixed 2001-12-31 16:59:41 +00:00
Jonas Maebe
dc912b6358 * changed remaining "getregister32" calls to "getregisterint" 2001-12-31 09:53:15 +00:00
Jonas Maebe
f15dbd7bf0 * range checking is now processor independent (part in cgobj, part in cg64f32) and should work correctly again (it needed some changes after the changes of the low and high of tordef's to int64) * maketojumpbool() is now processor independent (in ncgutil) * getregister32 is now called getregisterint 2001-12-30 17:24:45 +00:00
Jonas Maebe
91f567bb66 * powerpc/cgcpu.pas compiles :)
* several powerpc-related fixes
  * cpuasm unit is now based on common tainst unit
  + nppcmat unit for powerpc (almost complete)
2001-12-29 15:28:57 +00:00
Jonas Maebe
928493e3ba * made 'mod powerof2' -> 'and' optimization processor independent 2001-12-29 15:27:24 +00:00
Jonas Maebe
92977ca6ee * fixed fpuregister counting errors ("merged") 2001-12-27 15:33:58 +00:00
florian
521c608ece * array of const can now take widestring parameters as well 2001-12-17 23:16:05 +00:00
Jonas Maebe
b49f0958a6 * part of my fix for dynarray -> open array conversion, forgot to
commit yesterday :(
2001-12-11 08:14:17 +00:00
Jonas Maebe
cd378a2881 * fixed type conversions from dynamic arrays to open arrays 2001-12-10 14:34:04 +00:00
Jonas Maebe
760e88791c * fixed web bug #1716 2001-12-07 13:03:49 +00:00
florian
b60666ae1f + parasym to tparaitem added 2001-12-06 17:57:33 +00:00
Jonas Maebe
5501aa4e9a * converted lo/hi to processor independent code, generated code is the
same as before (when turning on the optimizer)
2001-12-04 15:59:03 +00:00
Jonas Maebe
f9e7a027b9 * unnecessary loads of constants are now also remove by
removePrevNotUsedLoad()
2001-12-04 15:58:13 +00:00
Jonas Maebe
8112592c45 * never generate any "shll/shrl $0,%reg" anymore 2001-12-04 15:57:28 +00:00
peter
e45bb82d81 * freemem change to value parameter
* torddef low/high range changed to int64
2001-12-03 21:48:41 +00:00
Jonas Maebe
6dbf240bde * less unnecessary regvar loading with if-statements 2001-12-02 16:19:17 +00:00
Jonas Maebe
fe8b328091 * added missing allocregbetween() call for a memtoreg() optimization 2001-11-30 16:35:02 +00:00
peter
e94751b801 * changed aktprocsym to aktprocdef for stabs generation 2001-11-18 18:59:59 +00:00
florian
cee59f5e0d * handling of ansi- and widestring results improved 2001-11-18 00:00:34 +00:00
Jonas Maebe
60dc4bf0a9 * moved call to "cleanup_regvars" to cga.pas for i386 because it has
to insert "fstp %st0" instructions after the exit label
2001-11-06 16:39:02 +00:00
peter
a059a1671d * fixed crash with inlining after aktprocdef change 2001-11-02 23:24:40 +00:00
Jonas Maebe
a87a30b831 * fixed web bug #1665 (allow char to chararray type conversion) ("merged") 2001-11-02 23:24:11 +00:00
peter
d2e1952377 * procsym definition rewrite 2001-11-02 22:58:00 +00:00
peter
ac400051bd * allow assignment of overloaded procedures to procvars when we know
which procedure to take
2001-10-28 17:22:25 +00:00
Jonas Maebe
e02d95ed13 + replace mem accesses to locations to which a reg was stored recently with that reg 2001-10-27 10:20:43 +00:00
peter
e37dbf904d * calling convention rewrite 2001-10-25 21:22:32 +00:00
peter
cb06c9bcb8 * array access for properties added 2001-10-21 12:33:05 +00:00
peter
6a42a332dd * concatcopy could release a wrong reference because the offset was
increased without restoring the original before the release of
    a temp
2001-10-20 17:22:57 +00:00
Jonas Maebe
66567674ba + also replace mem references in modify operands with regs 2001-10-14 11:50:21 +00:00
Jonas Maebe
32deddeab1 * finetuned register allocation info for assignments 2001-10-14 11:49:51 +00:00
Jonas Maebe
82f7cf0957 + memory references are now replaced by register reads in "regular"
instructions (e.g. "addl ref1,%eax" will be replaced by "addl %ebx,%eax"
    if %ebx contains ref1). Previously only complete load sequences were
    optimized away, but not such small accesses in other instructions than
    mov/movzx/movsx
2001-10-12 13:58:05 +00:00
Jonas Maebe
97c1152c6d * finer granularity for allocation of reused/replaced registers 2001-10-12 13:55:03 +00:00
Jonas Maebe
eefd8e9f86 * fixed small crashing bug ("merged")
* some more optimizations are now only done once at the end of the optimizing
    cycle instead of every iteration
2001-10-12 13:53:24 +00:00
Jonas Maebe
8a2c142e46 * fixed internalerror(10) due to previous fpu overflow fixes ("merged")
* fixed bug in n386add (introduced after compilerproc changes for string
    operations) where calcregisters wasn't called for shortstring addnodes
  * NOTE: from now on, the location of a binary node must now always be set
     before you call calcregisters() for it
2001-10-12 13:51:51 +00:00
Jonas Maebe
bdf2593265 * fixed range check errors 2001-10-04 14:33:28 +00:00
peter
7312815d01 * int64->boolean fixed 2001-09-30 21:28:34 +00:00
Jonas Maebe
39f67208a8 * made most constant and mem handling processor independent 2001-09-30 16:17:17 +00:00
Jonas Maebe
a40c2b8dd0 - removed unused units form uses-clause and unused local vars 2001-09-30 16:16:28 +00:00
Jonas Maebe
f33d23922a - removed unnecessary i386 pass_2 of as- and isnode and added dummy generic ones 2001-09-30 16:12:46 +00:00
Jonas Maebe
170234049b - removed unused code (replaced by processor independent code) 2001-09-29 21:34:04 +00:00
Jonas Maebe
fc6d300a95 * almost all second pass typeconvnode helpers are now processor independent
* fixed converting boolean to int64/qword
  * fixed register allocation bugs which could cause internalerror 10
  * isnode and asnode are completely processor indepent now as well
  * fpc_do_as now returns its class argument (necessary to be able to use it
    properly with compilerproc)
2001-09-29 21:32:46 +00:00
Jonas Maebe
fac1fb3d6c * fixed bug in a_load_reg_reg + implemented a_call 2001-09-29 21:32:19 +00:00
Jonas Maebe
b374bec6fb * changed all flow control structures (except for exception handling
related things) to processor independent code (in new ncgflw unit)
  + generic cgobj unit which contains lots of code generator helpers with
    global "cg" class instance variable
  + cgcpu unit for i386 (implements processor specific routines of the above
    unit)
  * updated cgbase and cpubase for the new code generator units
  * include ncgflw unit in cpunode unit
2001-09-28 20:39:32 +00:00
Jonas Maebe
8e70f9aaf8 * fixed big bug in my previous changes (the arguent for bts/btr is always
a 32 bit register, but it wasn't cleared properly if the value was only
    an 8 bit one)
2001-09-28 20:38:51 +00:00
Jonas Maebe
49f399d750 * fixed bug reported by sg about self not being restored after calling
setlength
2001-09-27 13:03:18 +00:00
michael
d75c4d6486 * Smartlinking with interfaces fixed
* Better smartlinking for rtti and init tables
2001-09-19 11:04:41 +00:00
peter
45dab81414 * merged netbsd, fpu-overflow from fixes branch 2001-09-17 21:29:10 +00:00
Jonas Maebe
e8c8f8785a * fixed bug with assigning ansistrings (left^.location was released too
early, caused bug reported by Aleksey V. Vaneev in mailing list on
    2001/09/07 regarding 'problems with nested procedures and local vars'
    ("merged" from cga.pas in the fixes branch)
2001-09-09 08:51:09 +00:00
Jonas Maebe
100a911290 * when calling an inline procedure inside a nested procedure, the
framepointer was being pushed on the stack, but this pushed framepointer
    was never used nor removed from the stack again after the inlining was
    done. It's now simply not pushed anymore, because the inlined procedure
    can get the previous framepointer from the procedure in which it is being
    inlined (merged)
2001-09-09 08:50:15 +00:00
Jonas Maebe
a39cd8a580 * made multiplying, dividing and mod'ing of int64 and qword processor
independent with compilerprocs (+ small optimizations by using shift/and
    where possible)
2001-09-05 15:22:09 +00:00
Jonas Maebe
17b2fa3424 * simplified det_resulttype code for include/exclude
* include/exclude doesn't use any helpers anymore in the i386 secondpass
2001-09-04 14:32:45 +00:00
Jonas Maebe
1fd6a2c5f8 * commented out some inactive code in csopt386
+ small improvement: lea is now handled the same as mov/zx/sx
2001-09-04 14:01:03 +00:00
Jonas Maebe
ed449defca + searchsystype() and searchsystype() functions in symtable
* changed ninl and nadd to use these functions
  * i386 set comparison functions now return their results in al instead
    of in the flags so that they can be sued as compilerprocs
  - removed all processor specific code from n386add.pas that has to do
    with set handling, it's now all done in nadd.pas
  * fixed fpc_set_contains_sets in genset.inc
  * fpc_set_in_byte is now coded inline in n386set.pas and doesn't use a
    helper anymore
  * some small fixes in compproc.inc/set.inc regarding the declaration of
    internal helper types (fpc_small_set and fpc_normal_set)
2001-09-04 11:38:54 +00:00
Jonas Maebe
f256a47f04 * compilerproc implementation of set addition/substraction/...
* changed the declaration of some set helpers somewhat to accomodate the
    above change
  * i386 still uses the old code for comparisons of sets, because its
    helpers return the results in the flags
  * dummy tc_normal_2_small_set type conversion because I need the original
    resulttype of the set add nodes
  NOTE: you have to start a cycle with 1.0.5!
2001-09-03 13:27:41 +00:00
peter
915b5cd7a9 * split constsym.value in valueord,valueordptr,valueptr. The valueordptr
is used for holding target platform pointer values. As those can be
    bigger than the source platform.
2001-09-02 21:18:28 +00:00
Jonas Maebe
8b3905de23 * i386*: call and jmp read their first operand
* cgcal: deallocate hlper register only after call statement (fixes bug
    with "procedure of object" and optimizer reported to bugrep on
    2001/08/30) ('merged')
2001-09-01 23:02:30 +00:00
peter
2d610e9be3 * asbsd merged 2001-08-30 20:57:09 +00:00
peter
f88f6eb571 * rtti/init table updates
* rttisym for reusable global rtti/init info
  * support published for interfaces
2001-08-30 20:13:52 +00:00
Jonas Maebe
41a57028b9 * converted adding/comparing of strings to compileproc. Note that due
to the way the shortstring helpers for i386 are written, they are
    still handled by the old code (reason: fpc_shortstr_compare returns
    results in the flags instead of in eax and fpc_shortstr_concat
    has wierd parameter conventions). The compilerproc stuff should work
    fine with the generic implementations though.
  * removed some nested comments warnings
2001-08-30 15:43:14 +00:00
michael
fc704cd7b0 + Patch for wrong paramsize 2001-08-30 11:57:20 +00:00
Jonas Maebe
06f9cd4c96 * some fixes in compilerprocs for chararray to string conversions
* conversion from string to chararray is now also done via compilerprocs
2001-08-29 19:49:03 +00:00
Jonas Maebe
cecfe5dd49 * removed unused var 2001-08-29 17:50:45 +00:00
Jonas Maebe
003549eba1 * the optimizer now keeps track of flags register usage. This fixes some
optimizer bugs with int64 calculations (because of the carry flag usage)
  * fixed another bug which caused wrong optimizations with complex
    array expressions
2001-08-29 14:07:43 +00:00
Jonas Maebe
105b7ae809 + new createinternres() constructor for tcallnode to support setting a
custom resulttype
  * compilerproc typeconversions now set the resulttype from the type
    conversion for the generated call node, because the resulttype of
    of the compilerproc helper isn't always exact (e.g. the ones that
    return shortstrings, actually return a shortstring[x], where x is
    specified by the typeconversion node)
  * ti386callnode.pass_2 now always uses resulttype instead of
    procsym.definition.rettype (so the custom resulttype, if any, is
    always used). Note that this "rettype" stuff is only for use with
    compilerprocs.
2001-08-29 12:18:07 +00:00
Jonas Maebe
14576640c5 * fixed wrong regalloc info around FPC_MUL/DIV/MOD_INT64/QWORD calls
* fixed partial result overwriting with the above calls too
2001-08-29 12:03:23 +00:00
Jonas Maebe
e57f168475 + support for int64 LOC_REGISTERS in remove_non_regvars_from_loc 2001-08-29 12:01:47 +00:00
Jonas Maebe
fc92c3b336 + compilerproc implementation of most string-related type conversions
- removed all code from the compiler which has been replaced by
    compilerproc implementations (using {$ifdef hascompilerproc} is not
    necessary in the compiler)
2001-08-28 13:24:46 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00
Jonas Maebe
808ab9e7e7 * fixed big bug in handle_str that caused it to (almost) always call
fpc_<stringtype>_longint
  * fixed small bug in handle_read_write that caused wrong warnigns about
    uninitialized vars with read(ln)
  + handle_val (processor independent val() handling)
2001-08-24 12:33:54 +00:00
Jonas Maebe
460af7729c * fixed memory leak with coping of array-of-consts as valuepara 2001-08-24 12:22:14 +00:00
Jonas Maebe
a6cfe4083a + tempcreate/ref/delete nodes (allows the use of temps in the
resulttype and first pass)
  * made handling of read(ln)/write(ln) processor independent
  * moved processor independent handling for str and reset/rewrite-typed
    from firstpass to resulttype pass
  * changed names of helpers in text.inc to be generic for use as
    compilerprocs + added "iocheck" directive for most of them
  * reading of ordinals is done by procedures instead of functions
    because otherwise FPC_IOCHECK overwrote the result before it could
    be stored elsewhere (range checking still works)
  * compilerprocs can now be used in the system unit before they are
    implemented
  * added note to errore.msg that booleans can't be read using read/readln
2001-08-23 14:28:35 +00:00
florian
7db13ea48f * some bugs fix:
- overload; with external procedures fixed
    - better selection of routine to do an overloaded
      type case
    - ... some more
2001-08-19 21:11:20 +00:00
Jonas Maebe
61020cd424 * made in_reset_typedfile/in_rewrite_typedfile handling processor
independent
2001-08-13 15:39:52 +00:00
Jonas Maebe
0895ca2f28 * made code for str(x,y) completely processor independent 2001-08-13 12:41:56 +00:00
peter
0af6dc4c36 * netbsd doesn't use stackchecking 2001-08-12 20:23:02 +00:00
peter
634a68bf3e * merged netbsd start
* profile for win32
2001-08-07 18:47:12 +00:00
peter
81200dc9ef * funcret moved from tprocinfo to tprocdef 2001-08-06 21:40:46 +00:00
peter
8d11d0d6bf * partly fix for proc of obj=nil 2001-08-05 13:19:51 +00:00
peter
62cccdebb5 * fixed passing of array of record or shortstring to open array 2001-08-01 21:47:48 +00:00
peter
1bd742fe0b * fixed empty pwidechar register allocation 2001-08-01 21:44:59 +00:00
Jonas Maebe
64f266bf07 * fixed endless loop with web bug #1571 (merged) 2001-08-01 09:46:55 +00:00
peter
c4b84ce276 * m68k updates from v10 merged 2001-07-30 20:59:27 +00:00
peter
2f3b205358 * fixed opsize for assignment with LOC_JUMP 2001-07-28 15:13:17 +00:00
Jonas Maebe
acb4dca7fb * fixed allocation of register before release in second_cstring_to_pchar 2001-07-16 13:19:08 +00:00
peter
53e8ce0e1e * internal length for ansistring and widestrings 2001-07-10 18:01:08 +00:00
peter
ca8d604964 * various widestring updates, it works now mostly without charset
mapping supported
2001-07-08 21:00:14 +00:00
peter
b10e754536 * alignmentinfo record added
* -Oa argument supports more alignment settings that can be specified
    per type: PROC,LOOP,VARMIN,VARMAX,CONSTMIN,CONSTMAX,RECORDMIN
    RECORDMAX,LOCALMIN,LOCALMAX. It is possible to set the mimimum
    required alignment and the maximum usefull alignment. The final
    alignment will be choosen per variable size dependent on these
    settings
2001-07-01 20:16:15 +00:00
Jonas Maebe
fa05db818d * fixed set bug discovered by Carl (merged) 2001-06-25 14:11:37 +00:00
peter
e24474d9ac * -Ur switch (merged)
* masm fixes (merged)
  * quoted filenames for go32v2 and win32
2001-06-18 20:36:23 +00:00
peter
55eb369653 * better const to var checking 2001-06-04 11:48:01 +00:00
peter
add30a428e * Kylix fixes, mostly case names of units 2001-06-03 20:21:08 +00:00
peter
97695d261d * t_beos target inclusion 2001-06-03 15:12:47 +00:00
florian
fb40dcd0bb + some widestring stuff added 2001-05-27 14:30:55 +00:00
peter
25535227b4 * function returning int64 inlining fixed 2001-05-19 21:22:53 +00:00
peter
b2fd39bc94 * portable constants 2001-05-18 23:01:13 +00:00
peter
767062cb3b * tasmnode.pass_2 is independent of cpu, moved to ncgbas
* include ncgbas for independent nodes
2001-05-18 22:31:06 +00:00
Jonas Maebe
7ca4933913 * added missign begin..end pair (noticed by Carl) 2001-05-16 15:11:42 +00:00
peter
b9cb031a39 * simplify_ppu is now the default, a recompile of the compiler now
only compiles pp.pas
2001-05-12 12:11:31 +00:00
florian
05cfc07952 * some more support for widechars commited especially
regarding type casting and constants
2001-05-08 21:06:30 +00:00
Jonas Maebe
344fd00373 * completed incomplete typed constant records 2001-05-06 17:13:22 +00:00
Jonas Maebe
676fe2fee3 * fixed an IE10 and another bug with [var1..var2] construct 2001-05-06 17:12:14 +00:00
peter
275f0968a3 * stupid bug, finalization to initialization renaming 2001-04-21 15:33:03 +00:00
peter
b87b73d9bf * made tclassheader using class of to implement cpu dependent code 2001-04-21 13:37:16 +00:00
peter
6772ce2ca1 * move winstackpagesize const to cgai386 to remove uses t_win32 2001-04-21 13:33:16 +00:00
peter
1fdb035bbe * restore correct pass2 handling bug #1425 (merged) 2001-04-21 12:13:15 +00:00
peter
ed290df007 * fixed bug #1472 (merged) 2001-04-21 12:09:00 +00:00
peter
a03061cb03 * add nop after popa (merged) 2001-04-21 12:05:32 +00:00
peter
0c03535b5b * registration of targets and assemblers 2001-04-18 22:01:53 +00:00
peter
5677fbe1b4 * fixed crash in labelnode
* easier detection of goto and label in try blocks
2001-04-15 09:48:29 +00:00
peter
af5d6e60e7 * moved more code from pass_1 to det_resulttype 2001-04-14 14:07:10 +00:00
peter
60162bf433 * allow unit.identifier in asm readers 2001-04-13 20:06:05 +00:00
peter
f0a0c63c77 * scanner object to class 2001-04-13 18:20:21 +00:00
peter
a7cf57524e * symtable change to classes
* range check generation and errors fixed, make cycle DEBUG=1 works
  * memory leaks fixed
2001-04-13 01:22:06 +00:00
Jonas Maebe
a022ac9bb2 * fixed bug due to short boolean evaluation 2001-04-06 16:24:38 +00:00
Jonas Maebe
2cc7d970e1 * fixed bug in ti386innode.pass_2 code and made it simpler/faster 2001-04-06 14:09:34 +00:00
Jonas Maebe
cf600d6688 * fixed incompatibility between new regvar handling and -Op2 2001-04-06 14:06:03 +00:00
peter
611d242891 * movd and opsize fix merged 2001-04-05 21:33:45 +00:00
peter
4383a5b3fa * fast exit fix merged 2001-04-05 21:33:07 +00:00
peter
226ea788db * fix for not with no 32bit values 2001-04-04 22:37:06 +00:00
peter
4e2655cdc5 * resulttype rewrite 2001-04-02 21:20:29 +00:00
peter
e4f647f801 * masm -al fix (merged) 2001-03-25 12:30:17 +00:00
peter
d65195ed90 * offset_fixup fixes (merged) 2001-03-25 12:29:45 +00:00
Jonas Maebe
fe7eb08eef * fixed some memory leaks 2001-03-13 11:52:48 +00:00
peter
d8abf76f6b * getsym redesign, removed the globals srsym,srsymtable 2001-03-11 22:58:49 +00:00
peter
21fc432ada * noag386bin fix 2001-03-05 21:49:44 +00:00
peter
1b1f938c43 * changed to class with common TAssembler also for internal assembler 2001-03-05 21:39:11 +00:00
Jonas Maebe
2e3ba14936 * new rangecheck code now handles conversion between signed and cardinal types correctly 2001-03-04 10:26:56 +00:00
Jonas Maebe
af38291233 * simplified and optimized range checking code, FPC_BOUNDCHECK is no longer necessary 2001-03-03 12:41:22 +00:00
peter
05160462c9 * fpu fixes (merged) 2001-02-20 21:51:36 +00:00
peter
3ea409ab44 * tasm/masm fixes merged 2001-02-20 21:36:39 +00:00
peter
c72d1f4c76 * iret, lret fixes 2001-02-20 21:34:04 +00:00
Jonas Maebe
4e942c9a0f * simplified and optimized code generated for in-statements 2001-02-11 12:14:56 +00:00
peter
55d92375c4 * merged fix for bug #1327 2001-02-09 23:42:49 +00:00
Jonas Maebe
74c1d32ce9 * fixed web bug #1396: tpointerord is now a cardinal instead of a longint,
but added a hack in ncnv so that pointer(-1) still works
2001-02-08 13:09:03 +00:00
Jonas Maebe
40104b2a7a * fixed web bug #1391 2001-02-08 12:13:40 +00:00
Jonas Maebe
177ec922fe * fixed web bug #1383 2001-02-03 12:52:34 +00:00
peter
ffb25bce60 * fixed crash with new(precord), merged 2001-02-02 22:38:00 +00:00
florian
cfd15b7127 * behavior -Oa optimized 2001-01-27 21:29:35 +00:00
peter
acd6ede655 * fixed operand order that got mixed up for external writers after
my previous assembler block valid instruction check
2001-01-13 20:24:24 +00:00
peter
00c901b3c1 * check for valid asm instructions 2001-01-12 19:18:42 +00:00
Jonas Maebe
3fd4ce9c89 * really fixed problems with -Op2 opts (merged) 2001-01-10 10:29:36 +00:00
michael
d5ef327f9e + Patch from jonas so 1.0.2 can be used to cycle 2001-01-10 08:52:40 +00:00
peter
d61f29c799 * don't push high value for open array with cdecl;external; 2001-01-08 21:46:46 +00:00
peter
35a172090a * internalerror for string to chararray 2001-01-08 21:45:11 +00:00
Jonas Maebe
7725beb1e3 * fixed crashing bug to due previous changes 2001-01-07 15:51:17 +00:00
Jonas Maebe
b503c3e3b8 * fixed bug in call/jmp optimization with -Op1 and -Op2 2001-01-07 15:49:49 +00:00
Jonas Maebe
8b0adc1f23 * references to symbols were only decreased in taicpu.done for jmps, fixed 2001-01-07 15:48:56 +00:00
Jonas Maebe
e753af622e * fixed webbug 1323 2001-01-06 23:35:05 +00:00
Jonas Maebe
76ac79aace * fixed IE 10 (but code is less efficient now :( ) 2001-01-06 19:12:31 +00:00
florian
00917cb46f * the info about exception frames is stored now on the stack
instead on the heap
2001-01-05 17:35:50 +00:00
Jonas Maebe
82cd898e2e + initial implementation (still needs to be made more modular) 2001-01-04 11:24:19 +00:00
Jonas Maebe
4c8ca9774f + implemented/fixed docompare() mathods for all nodes (not tested)
+ nopt.pas, nadd.pas, i386/n386opt.pas: optimized nodes for adding strings
    and constant strings/chars together
  * n386add.pas: don't copy temp strings (of size 256) to another temp string
    when adding
2000-12-31 11:14:10 +00:00
Jonas Maebe
2e5e5eb1a4 * optimized loadshortstring a bit 2000-12-31 11:02:12 +00:00
Jonas Maebe
87405bf710 * fixed potential bug in writeToMemDestroysContents 2000-12-31 11:00:31 +00:00
peter
1a9f0943cb * unrolled loops in taicpu.destroy 2000-12-26 15:56:17 +00:00
peter
32b9cdb7cf + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects)
2000-12-25 00:07:25 +00:00
peter
b7c591affd * object to class for ow/og objects
* split objectdata from objectoutput
2000-12-23 19:59:35 +00:00
peter
be95b0758b * object to class conversion
* more verbosity for -vt and -vd
  * -i options can be put after eachother so the Makefiles only need
    to call fpc once for all info (will be twice as the first one will
    be to check the version if fpc supports multiple info)
2000-12-23 19:46:49 +00:00
Jonas Maebe
a4dcdea87d * fixed range error 2000-12-21 12:22:53 +00:00
peter
2c2b7bbf1e * extdebug fixes 2000-12-18 21:56:52 +00:00
Jonas Maebe
08f33f6156 * int64 case fixes
* explicit longint type casts for constants used in assembler code
    generation s,ice they can be cardinals too (or even int64's in case of
    range check errors)
2000-12-18 17:45:32 +00:00
Jonas Maebe
200e1d4b25 * removed warnings about possible range check errors 2000-12-16 15:58:18 +00:00
Jonas Maebe
4f791d04b4 - removed all ifdef cardinalmulfix code 2000-12-16 15:56:18 +00:00
peter
cf381a7f48 * clear usedasmsymbol at exit of writetree 2000-12-12 19:50:21 +00:00
Jonas Maebe
585b5f2e00 * fixed web bug #1144
+ implemented range checking for 64bit types
2000-12-11 19:10:19 +00:00
florian
9e14dafee3 * helper name of val for qword fixed 2000-12-09 22:51:37 +00:00
florian
a91a67f75b * AfterConstructor isn't called anymore when a constructor failed 2000-12-09 10:45:40 +00:00
Jonas Maebe
c91a23c27d * new constant handling: from now on, hex constants >$7fffffff are
parsed as unsigned constants (otherwise, $80000000 got sign extended
    and became $ffffffff80000000), all constants in the longint range
    become longints, all constants >$7fffffff and <=cardinal($ffffffff)
    are cardinals and the rest are int64's.
  * added lots of longint typecast to prevent range check errors in the
    compiler and rtl
  * type casts of symbolic ordinal constants are now preserved
  * fixed bug where the original resulttype wasn't restored correctly
    after doing a 64bit rangecheck
2000-12-07 17:19:42 +00:00
Jonas Maebe
a8af566cd7 + new integer regvar handling, should be much more efficient 2000-12-05 11:44:32 +00:00
Jonas Maebe
72bc010795 * when searching for constants in registers, the returned register
sometimes didn't have the same size as the requested size
2000-12-05 09:33:42 +00:00
Jonas Maebe
8e1fa5b1de * fixed bug where "shl $1,%reg" was changed to "leal (%reg),%reg2"
instread of to "leal (,%reg,2),%reg2"
2000-12-05 09:32:47 +00:00
Jonas Maebe
06af76dd6c * invalidate regs that depend on a modified register 2000-12-04 17:00:09 +00:00
florian
ec796cc40b * fixed web buzg 1275: problem with int64 functions results 2000-12-03 22:26:54 +00:00
florian
ac4bbd85f0 * renamed 2000-11-30 22:41:55 +00:00
florian
00a98196cc * moved to i386 2000-11-30 22:16:49 +00:00
peter
bbe34f11f1 * merged fix for bug #1229 2000-11-30 20:27:51 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
Jonas Maebe
3974b23c97 + support for optimizing simple sequences with div/idiv/mul opcodes 2000-11-28 16:32:11 +00:00
pierre
319ddd55cb * stabs fixing 2000-11-28 00:28:06 +00:00
Jonas Maebe
a4928640fc * fixed stupid bug in previous commit 2000-11-23 14:20:18 +00:00
Jonas Maebe
f88e80bced * fix for webbug 1066/1126 2000-11-23 13:26:33 +00:00
Jonas Maebe
3009d5e82b * fixed bug where "imul mem32,reg,reg" could be generated 2000-11-22 16:30:04 +00:00
Jonas Maebe
cc5b2c5709 * fixed inline-related problems (partially "merges") 2000-11-22 15:12:06 +00:00
Jonas Maebe
71790cc1c8 * longint typecast to assignment of constant to offset field 2000-11-20 15:31:38 +00:00
Jonas Maebe
5ffc4f7e24 * fixed bug in my changes to fix the regalloc info for div/mod ("merged") 2000-11-20 14:05:50 +00:00
Jonas Maebe
bbd2e6cdaf * fixed another bug in allocregbetween (introduced by the previous fix)
("merged")
2000-11-17 15:22:04 +00:00
Jonas Maebe
95351bb8f7 * fixed webbug 1222 ("merged") 2000-11-17 14:09:00 +00:00