Commit Graph

193 Commits

Author SHA1 Message Date
daniel
6e0a7bb0eb * Nil constants that are type converted to a method procvar are now
properly converted. The conversion is done at runtime to generate
    a two pointer memory reference as result location, something
    which the code generator can handle very well, which minimizes
    the chance of side effects.

git-svn-id: trunk@7978 -
2007-07-07 20:57:05 +00:00
Jonas Maebe
abef29c1d5 * fixed x86 vector mmloads and use scalar loads in ncgcnv
git-svn-id: trunk@5967 -
2007-01-14 13:36:26 +00:00
Jonas Maebe
fc99b0ad48 * fixed floating point precision conversions for loc_mmregister and
between loc_fpuregister and loc_mmregister

git-svn-id: trunk@5942 -
2007-01-13 15:00:00 +00:00
Jonas Maebe
e815b923d5 * a_loadfpu_* gets two size parameters: fromsize and tosize
* fixed downsizing the precision of floating point values
  * floating point constants are now treated using only the minimal
    precision required (e.g. 2.0 is now a single, 1.1 extended etc)
    (Delphi compatible)

git-svn-id: trunk@5927 -
2007-01-12 18:33:51 +00:00
florian
ac5b260ec2 * registers of references aren't reused so we can safe a mov
git-svn-id: trunk@5411 -
2006-11-16 22:26:03 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
peter
136d3e8d46 * refactor implemented interfaces
git-svn-id: trunk@5134 -
2006-10-31 22:38:49 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
peter
d07f470b71 * remove ifdef fpc
git-svn-id: trunk@4819 -
2006-10-07 13:43:34 +00:00
Jonas Maebe
039e7143f4 * avoid some unnecessary bool->int->bool type conversions
git-svn-id: trunk@3184 -
2006-04-09 18:33:05 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
45176ea2a8 * split tstringtype for stringdef and stringconstnode
to prevent wrong typecasts

git-svn-id: trunk@2276 -
2006-01-13 17:20:27 +00:00
peter
edf553a223 * string constants are now array of char until
they are converted to a specific string type

git-svn-id: trunk@1254 -
2005-10-02 11:08:58 +00:00
peter
a3ab2053c9 * support multiple asmlabel types, renamed getlabel to
getjumplabel and added type para to getlabel for specific types
  * moved lineinfo generation from assemble and aggas to dbgstabs

git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
florian
804207239d *c <int64>:=-<longint> fixed (bug 4253)
git-svn-id: trunk@796 -
2005-08-05 19:00:30 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
Jonas Maebe
6cc3dbae94 * fixed web bug #3694 2005-03-05 20:08:27 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
bb32ee0457 * fix interface vtbl optimization
* replace ugly pointer construct of ioffset()
2005-01-09 15:05:29 +00:00
peter
04e7db0905 * typecast float to non-float needs a move to memory 2004-12-26 20:09:35 +00:00
florian
f068e0c3da * fixed extended->double/single conversion when using sse 2004-12-25 12:29:08 +00:00
florian
0ad4b9d394 * optimized float to float conversion 2004-12-25 10:48:17 +00:00
Jonas Maebe
9e24c28774 - removed superfluous location_force_reg() in second_nothing 2004-12-11 15:25:40 +00:00
Jonas Maebe
2bd47e8ce6 * fixed type conversion between same-size ints with different signs in
case the value is already in a register
2004-12-10 23:38:54 +00:00
peter
2b6456fe16 * procvar handling for tp procvar mode fixed
* proc to procvar moved from addrnode to typeconvnode
  * inlininginfo is now allocated only for inline routines that
    can be inlined, introduced a new flag po_has_inlining_info
2004-12-05 12:28:10 +00:00
peter
459858305e * location_force_reg in second_nothing can reuse LOC_CREGISTER 2004-11-29 21:02:08 +00:00
peter
5f61be6b4d * prevent some IEs with delphi methodpointers 2004-11-29 17:32:56 +00:00
florian
73c30d6579 * fixed arm compilation with cgutils
* ...
2004-11-01 17:41:28 +00:00
peter
a2cbf27e96 * -Or fix for absolute 2004-11-01 15:31:57 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
peter
65c3ba277c * ungetregister is now only used for cpuregisters, renamed to
ungetcpuregister
  * renamed (get|unget)explicitregister(s) to ..cpuregister
  * removed location-release/reference_release
2004-09-25 14:23:54 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
daniel
b721e5872c * Prepare compiler infrastructure for multiple ansistring types 2004-04-29 19:56:36 +00:00
olle
4fecc1a56f * big transformation of Tai_[const_]Symbol.Create[data]name* 2004-03-02 00:36:32 +00:00
florian
fabb9c33ac * top_symbol killed
+ refaddr to treference added
  + refsymbol to treference added
  * top_local stuff moved to an extra record to save memory
  + aint introduced
  * tppufile.get/putint64/aint implemented
2004-02-27 10:21:04 +00:00
florian
465aa5851b * several fixes to compile x86-64 system 2004-02-05 01:24:08 +00:00
peter
1422985ca0 * Change several $ifdef i386 to x86
* Change several OS_32 to OS_INT/OS_ADDR
2004-01-31 17:45:16 +00:00
florian
3d8e1ab1fb + fpu<->mm register conversion 2003-12-26 00:32:21 +00:00
peter
8fe15f4c99 * removed unused checkobject method 2003-12-22 23:08:59 +00:00
florian
8b337fb5ef + type cast variant<->enum
* cnv. node second pass uses now as well helper wrappers
2003-11-04 22:30:15 +00:00
peter
fb81b7ebbb * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
* tregisteralloctor renamed to trgobj
  * removed rgobj from a lot of units
  * moved location_* and reference_* to cgobj
  * first things for mmx register allocation
2003-10-10 17:48:13 +00:00
daniel
b2343f4b16 * Register allocator splitted, ans abstract now 2003-10-09 21:31:37 +00:00
peter
70fe77ca7c * procinfo unit contains tprocinfo
* cginfo renamed to cgbase
  * moved cgmessage to verbose
  * fixed ppc and sparc compiles
2003-10-01 20:34:48 +00:00
peter
d77cf79d3b * optimized releasing of registers 2003-09-28 13:39:38 +00:00
peter
15958fec9f * methodpointer fixes 2003-08-26 12:43:02 +00:00
peter
d91c880148 * cg.a_load_* get a from and to size specifier
* makeregsize only accepts newregister
  * i386 uses generic tcgnotnode,tcgunaryminus
2003-06-03 21:11:09 +00:00
peter
230a14ff68 * getregisterfpu size parameter added
* op_const_reg size parameter added
  * sparc updates
2003-06-01 21:38:06 +00:00
Jonas Maebe
9a0c1f50e9 - undid previous patch, it was not necessary and on top of that, it
contained a bug :/
2003-05-25 09:27:13 +00:00
Jonas Maebe
54cacc63a5 * fixed integer typeconversion problems 2003-05-24 11:59:42 +00:00
peter
8ff5792776 * remove some unit dependencies
* current_procinfo changes to store more info
2003-05-23 14:27:35 +00:00
peter
47489f2376 * firstpass uses expectloc
* checks if there are differences between the expectloc and
    location.loc from secondpass in EXTDEBUG
2003-04-22 23:50:22 +00:00
olle
a069aadad0 * changed newasmsymbol to newasmsymboldata for data symbols 2003-04-06 21:11:23 +00:00
peter
c4ddcc78a8 * generic constructor working for i386
* remove fixed self register
  * esi added as address register for i386
2003-03-28 19:16:56 +00:00
daniel
86bcea6ef5 * Code generator converted to new register notation
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
peter
50862948e5 * fix typecasts from void to int 2003-01-02 22:20:51 +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
67486c96c3 * fixes for Delphi 6 compilation
(warning : Some features do not work under Delphi)
2002-10-05 12:43:23 +00:00
Jonas Maebe
a15d8cfe39 * a_load_reg_reg() now has two size parameters: source and dest. This
allows some optimizations on architectures that don't encode the
    register size in the register name.
2002-09-17 18:54:01 +00:00
Jonas Maebe
fcec3ae6b0 * big endian fix for second_int_to_int 2002-09-16 13:08:44 +00:00
peter
dcd9e0107c * old logs removed and tabs fixed 2002-09-07 15:25:00 +00:00
peter
88dce133e4 * reuse a reference when resizing ordinal values to smaller sizes,
this is required for constructions like byte(w):=1 that are
    allowed in tp mode only
2002-09-02 18:46:00 +00:00
peter
4aa03c0656 * add calls to release temps 2002-08-25 09:06:58 +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
Jonas Maebe
ed08ed1ce0 * the as node again uses a compilerproc
+ (untested) support for interface "as" statements
2002-08-20 18:23:32 +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
florian
4b659ab4b2 * casting of classes to interface fixed when the interface was
implemented by a parent class
2002-08-12 20:39:17 +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
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
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
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
68ce5a00e5 * cg64 patch
* basics for currency
  * asnode updates for class and interface (not finished)
2002-07-01 16:23:52 +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
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
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
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
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
Jonas Maebe
71a52a4aeb * several powerpc-related additions and fixes 2002-04-06 18:10:42 +00:00
peter
5e7a1e3729 * removed unused units
* use tlocation.size in cg.a_*loc*() routines
2002-04-04 19:05:54 +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
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
Jonas Maebe
dc912b6358 * changed remaining "getregister32" calls to "getregisterint" 2001-12-31 09:53:15 +00:00
Jonas Maebe
bdf2593265 * fixed range check errors 2001-10-04 14:33:28 +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
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