Commit Graph

425 Commits

Author SHA1 Message Date
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
florian
881fe6d416 * passing interfaces as parameters fixed 2000-11-17 10:30:24 +00:00
florian
61c74729a6 * INT_CHECK_OBJECT_* isn't applied to interfaces anymore 2000-11-17 09:54:58 +00:00
Jonas Maebe
03005b8b6b * fixed web bug #1242 2000-11-16 15:27:48 +00:00
Jonas Maebe
19b4130e98 * fixed bug in allocregbetween 2000-11-14 13:26:10 +00:00
Jonas Maebe
a86df1002b * fixed some bugs in checksequence 2000-11-14 12:17:34 +00:00
Jonas Maebe
1cf903a9eb * added missing allocregbetween() (merged) 2000-11-14 09:53:18 +00:00
Jonas Maebe
75ad22bf64 * support for range checking when converting from 64bit to something
smaller (32bit, 16bit, 8bit)
  * fixed range checking between longint/cardinal and for array indexing
    with cardinal (values > $7fffffff were considered negative)
2000-11-13 14:47:46 +00:00
Jonas Maebe
4706eff850 * fixes so no more range errors with improved range checking code 2000-11-13 14:44:35 +00:00
florian
5694e05857 * some bugs with interfaces and NIL fixed 2000-11-13 11:30:54 +00:00
florian
1462deb207 * interfaces are basically running 2000-11-12 23:24:10 +00:00
peter
5ac2599649 * create generic toutputsection for binary writers 2000-11-12 22:20:37 +00:00
florian
1eea21e93f * fixed resourcestrings, made a stupid mistake yesterday 2000-11-11 22:59:20 +00:00
Jonas Maebe
6b00727480 * optimize converting of 8/16/32 bit constants to 64bit ones 2000-11-11 16:00:10 +00:00
florian
3f707e8676 * resourcestrings doesn't need the helper anymore they
access the table now direct
2000-11-09 18:52:06 +00:00
florian
68c1a1e3e6 * System.TypeInfo fixed
+ System.Finalize implemented
  + some new keywords for interface support added
2000-11-09 17:46:54 +00:00
Jonas Maebe
1331a2e753 * fixed range check error 2000-11-09 12:34:44 +00:00
sg
7530393d6f * Fix for containsPointerRef: Loop now runs in the correct range 2000-11-08 16:04:34 +00:00
florian
f89ea69e76 + AfterConstruction and BeforeDestruction impemented 2000-11-07 23:40:48 +00:00
florian
9e5ced1416 * fixed init_paras call 2000-11-06 23:49:20 +00:00
peter
ac3c08daca * added copyvaluepara call again 2000-11-06 23:15:01 +00:00
florian
51527ba1c9 + merged Attila's changes for interfaces, not tested yet 2000-11-04 14:25:19 +00:00
Jonas Maebe
71d94c07f8 * check for nil pointers before calling getcopy 2000-11-04 13:12:14 +00:00
Jonas Maebe
767ecef9bb * fixed bug in arrayRefsEq
* object/class fields are now handled the same as local/global vars and
    parameters (ie. a write to a local var can now never destroy a class
    field)
2000-11-03 18:06:26 +00:00
Jonas Maebe
5be6c35518 * some small improvements 2000-11-03 17:53:24 +00:00
Jonas Maebe
850e8de88b * register contents were not cleared if there was only 1 instruction
between de previous sequence and the current one
2000-11-01 22:53:30 +00:00
peter
4bcd969993 * merged asm result patch part 2 2000-10-31 22:30:13 +00:00
peter
451723647e * symtable splitted, no real code changes 2000-10-31 22:02:46 +00:00
Jonas Maebe
5a593618b2 * merged double deleting of left location when using a temp in
secondwith (merged from fixes branch). This also fixes web bug1194
2000-10-31 14:18:53 +00:00
Jonas Maebe
05be64d76c * fixed web bug1192 (changed an ungetregister32 to ungetregister)
("merged" from fixes)
2000-10-26 15:53:27 +00:00
Jonas Maebe
bdd82f8c9f * fixed setlength for shortstrings 2000-10-26 14:15:06 +00:00
peter
ba5fd6b9d8 * emitcall -> emitinsertcall for profiling (merged) 2000-10-24 22:23:04 +00:00
Jonas Maebe
207574e923 * allocate registers which hold function result 2000-10-24 12:47:45 +00:00
Jonas Maebe
a4fde73649 + register renaming ("fixes" bug1088)
* changed command line options meanings for optimizer:
      O2 now means peepholopts, CSE and register renaming in 1 pass
      O3 is the same, but repeated until no further optimizations are
        possible or until 5 passes have been done (to avoid endless loops)
  * changed aopt386 so it does this looping
  * added some procedures from csopt386 to the interface because they're
    used by rropt386 as well
  * some changes to csopt386 and daopt386 so that newly added instructions
    by the CSE get optimizer info (they were simply skipped previously),
    this fixes some bugs
2000-10-24 10:40:52 +00:00
michael
e2b535ec80 + Extra patch from peter 2000-10-24 08:54:25 +00:00
pierre
3a5981ae0c * fix for bug #1193 (merged) 2000-10-24 07:20:03 +00:00
florian
f80c24177a * a lot of changes:
- basic dyn. array support
     - basic C++ support
     - some work for interfaces done
     ....
2000-10-21 18:16:11 +00:00
Jonas Maebe
71d03d5926 * fixed wrong regalloc info for secondmoddiv ("merged", also small
correction made afterwards in fixes branch)
2000-10-19 16:26:52 +00:00
Jonas Maebe
837c2124a6 * fixed bug in allocregbetween (the register wasn't added to the
usedregs set of the last instruction of the chain) ("merged")
2000-10-19 15:59:40 +00:00
Jonas Maebe
a9656de262 * fixed stupid error in previous commit :/ 2000-10-17 15:41:48 +00:00
Jonas Maebe
3394523d13 * fixed allocation of ecx for shl 2000-10-17 15:39:34 +00:00
florian
25d7998a4b * fixed xmm register access 2000-10-15 10:50:46 +00:00
peter
026edfb899 * moved to i386/ 2000-10-15 09:43:29 +00:00
peter
a45e77c4a2 * move also the i386*.inc to i386/ 2000-10-15 09:41:37 +00:00
peter
4286d3e9bb * moved cpu*.pas to i386/
* renamed n386 to common cpunode
2000-10-15 09:39:36 +00:00
peter
5c5d24b641 * moved n386*.pas to i386/ cpu_target dir 2000-10-15 09:33:29 +00:00