daniel
86bcea6ef5
* Code generator converted to new register notation
...
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
daniel
538641a07a
- Removed reg_2_opsize array
2003-02-03 22:47: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
peter
25d973ef16
* self fixes for static methods (merged)
2003-01-30 21:46:57 +00:00
daniel
7be2b727f2
* Work on register conversion
2003-01-13 18:37:44 +00:00
daniel
cbe0383afe
* Further work to convert codegenerator register convention;
...
internalerror bug fixed.
2003-01-13 14:54:34 +00:00
daniel
7b2fd10fb4
* Converted some code in cgx86.pas to new register numbering
2003-01-09 20:40:59 +00:00
daniel
6e507ba483
* Added register conversion
2003-01-09 15:49:56 +00:00
daniel
fd4632c85b
* Added register convesrion procedure
2003-01-08 22:32:36 +00:00
daniel
55a161bbbf
* Tregister changed into a record
2003-01-08 18:43:56 +00:00
florian
b59b436130
* x86-64 compiles
...
+ very basic support for float128 type (x86-64 only)
2003-01-05 13:36:53 +00:00
peter
2d13cc9d04
* Long symbol names support
2002-12-24 18:10:34 +00:00
peter
af98b48c22
* stackpointer_alloc added for adjusting ESP. Win32 needs
...
this for the pageprotection
2002-12-24 15:56:50 +00:00
peter
46ed8eb932
* fixed pushing of records>8 bytes with stdcall
...
* simplified hightree loading
2002-12-17 22:19:33 +00:00
florian
1da30f2610
* tcallnode.paraitem introduced, all references to defcoll removed
2002-12-15 21:30:12 +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
florian
1b2a455ced
* two comments fixed
2002-12-05 14:18:09 +00:00
carl
fa27bba8c2
+ use FPC_CHECKPOINTER once again
2002-12-03 22:14:12 +00:00
carl
051cd78965
* some small cleanup (remove some specific operators which are not supported)
2002-12-01 22:08:34 +00:00
carl
5b05c7d2c3
- removed unused message
2002-11-30 23:16:39 +00:00
peter
1b116848d8
* cdecl array of const fixes
2002-11-27 20:04:38 +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
carl
60d17dbc01
* some small speed optimizations
...
+ added several new warnings/hints
2002-11-23 22:50:04 +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
peter
edbd98176b
* made tasmsymbol.refs private (merged)
2002-11-15 16:29:30 +00:00
peter
bfd72ad5d5
* merged changes from 1.0.7 up to 04-11
...
- -V option for generating bug report tracing
- more tracing for option parsing
- errors for cdecl and high()
- win32 import stabs
- win32 records<=8 are returned in eax:edx (turned off by default)
- heaptrc update
- more info for temp management in .s file with EXTDEBUG
2002-11-15 01:58:45 +00:00
pierre
f723f73f77
* correct last wrong fix for tw2158
2002-10-31 13:28:32 +00:00
pierre
1bd92de936
* merge of fix for tw2158 bug
2002-10-30 17:10:00 +00:00
Jonas Maebe
c5ba7e8d6d
* re-enabled optimized version of comparisons with the empty string that
...
I accidentally disabled in revision 1.26
2002-10-20 13:11:27 +00:00
florian
2f510f8f2f
* fixed to reflect last tconvtype change
2002-10-10 16:14:54 +00:00
carl
67486c96c3
* fixes for Delphi 6 compilation
...
(warning : Some features do not work under Delphi)
2002-10-05 12:43:23 +00:00
carl
801d6914e8
* range check error fixes
2002-10-03 21:31:10 +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
peter
c6430358b1
* push 0 instead of VMT when calling a constructor from a member
2002-09-16 19:07:37 +00:00
peter
e15a0ac67c
* support [eax].constant as reference
2002-09-16 19:07:00 +00:00
peter
6c06c346d8
* fix last optimization in genlinearlist, detected by bug tw1066
...
* use generic casenode.pass2 routine and override genlinearlist
* add jumptable support to generic casenode, by default there is
no jumptable support
2002-09-16 18:08:26 +00:00
Jonas Maebe
775b065d70
* small optimization to case genlist() case statements
2002-09-09 13:57:45 +00:00
carl
752beef0dd
* cardinal -> longword
2002-09-07 20:40:23 +00:00
peter
dcd9e0107c
* old logs removed and tabs fixed
2002-09-07 15:25:00 +00:00
daniel
b0364566d1
* Make Tprocdef.defs protected
2002-09-03 16:26:26 +00:00
peter
f77536fece
* use index register when available for generating a reference with
...
only a signle register. Using the base register could possibly
destroy the framepointer
2002-09-01 19:27:34 +00:00
peter
76bd75ed4a
* fixed generic tcgvecnode
...
* move code that updates a reference with index register and multiplier
to separate method so it can be overriden for scaled indexing
* i386 uses generic tcgvecnode
2002-09-01 18:46:01 +00:00
peter
5ab0e99252
* include accumulator in regs_to_push list
2002-09-01 18:43:27 +00:00
peter
a06f84daf8
* use a_call_reg
...
* ungetiftemp for procvar of object temp
2002-09-01 12:13:00 +00:00
peter
a28f75ed03
* sym.insert_in_data removed
...
* symtable.insertvardata/insertconstdata added
* removed insert_in_data call from symtable.insert, it needs to be
called separatly. This allows to deref the address calculation
* procedures now calculate the parast addresses after the procedure
directives are parsed. This fixes the cdecl parast problem
* push_addr_param has an extra argument that specifies if cdecl is used
or not
2002-08-25 19:25:18 +00:00
peter
d551c5d867
* i386 uses now the generic exception management from ncgflw
2002-08-24 18:35:42 +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
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
e313bab4ff
* first part of procinfo rewrite
2002-08-17 09:23:33 +00:00
peter
8082f79ea6
* first things tai,tnode storing in ppu
2002-08-15 19:10:35 +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
ecb32b0ef0
* first_int_to_real moved to i386 (other one is generic)
2002-08-14 19:19:14 +00:00
carl
534f6b2468
* bugfix of unaryminus node with left LOC_CREGISTER
2002-08-14 19:18:16 +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
c68b2dfbee
* rename swatoperands to swapoperands
...
+ m68k first compilable version (still needs a lot of testing):
assembler generator, system information , inline
assembler reader.
2002-08-13 18:01:50 +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
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
030eae46de
* a couple of interface related fixes
2002-08-09 07:33:01 +00:00
florian
b136cecacd
* first part of ppc calling conventions fix
2002-08-06 20:55:20 +00:00
Jonas Maebe
f8b6c707a2
* made assigned() handling generic
...
* add nodes now can also evaluate constant expressions at compile time
that contain nil nodes
2002-08-02 07:44:30 +00:00
florian
463b355ba3
* more powerpc fixes
...
+ dummy tcgvecnode
2002-07-28 21:34:31 +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
eb2ca8d10f
* rewrote the system handling
2002-07-26 21:15:37 +00:00
Jonas Maebe
ed2bdb31a6
* the optimization of converting a multiplication with a power of two to
...
a shl is moved from n386add/secondpass to nadd/resulttypepass
2002-07-26 11:17:52 +00:00
Jonas Maebe
185fa10345
* fixed (actual and potential) range errors
2002-07-26 11:16:35 +00:00
carl
ebbd8e9e04
+ added generic inline nodes
2002-07-25 18:01:58 +00:00
carl
448d40de1a
+ FPURESULTREG -> FPU_RESULT_REG
2002-07-25 17:56:29 +00:00
daniel
feb28ce902
* Added internal error when asked to generate code for 'if expr in []'
2002-07-23 14:31:00 +00:00
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